<?php
namespace app\common\lib;

class CommonConst{
	
	const first_open_vip_send_day=7;//开卡奖励发放时间
	
	const open_vip_reward_money_rate=0.1;//开卡奖励比例
	
	const mouth_card_type=1;//VIP月卡
	const year_card_type=2;//VIP年卡
	
	//支付类型
	const ORDER_PAY_TYPE_1=1;//微信支付
	const ORDER_PAY_TYPE_2=2;//支付宝支付
	const ORDER_PAY_TYPE_3=3;//IOS支付
	const ORDER_PAY_TYPE_4=4;//线下支付
	
	const ORDER_PAY_TYPES=[
		self::ORDER_PAY_TYPE_1=>'微信支付',
		self::ORDER_PAY_TYPE_2=>'支付宝支付',
		self::ORDER_PAY_TYPE_3=>'IOS支付',
		self::ORDER_PAY_TYPE_4=>'线下充值',
	];
	
	//分销类型
	const distribution_type_scene_1=1;//用户注册(官方/销售离职)-订单购买(官方/销售离职)
	const distribution_type_scene_2=2;//用户注册(官方/销售离职)-订单购买(在职销售)
	const distribution_type_scene_3=3;//用户注册(在职销售)-订单购买(官方/销售离职)
	const distribution_type_scene_4=4;//用户注册(在职销售)-订单购买(同在职销售)
	const distribution_type_scene_5=5;//用户注册(在职销售)-订单购买(不同在职销售)
	const distribution_type_scene_6=6;//用户注册(代理[官方/代理注册/销售离职])-订单购买(官方/销售离职)
	const distribution_type_scene_7=7;//用户注册(代理[官方/代理注册/销售离职])-订单购买(在职销售)
	const distribution_type_scene_8=8;//用户注册(代理[在职销售注册])-订单购买(官方/销售离职)
	const distribution_type_scene_9=9;//用户注册(代理[在职销售注册])-订单购买(同在职销售)
	const distribution_type_scene_10=10;//用户注册(代理[在职销售注册])-订单购买(不同在职销售)

//分销场景说明
	const distribution_types=[
		self::distribution_type_scene_1		=>"用户注册(官方/销售离职)-订单购买(官方/销售离职)",
		self::distribution_type_scene_2		=>"用户注册(官方/销售离职)-订单购买(在职销售)",
		self::distribution_type_scene_3		=>"用户注册(在职销售)-订单购买(官方/销售离职)",
		self::distribution_type_scene_4		=>"用户注册(在职销售)-订单购买(同在职销售)",
		self::distribution_type_scene_5		=>"用户注册(在职销售)-订单购买(不同在职销售)",
		self::distribution_type_scene_6		=>"用户注册(代理[官方/代理注册/销售离职])-订单购买(官方/销售离职)",
		self::distribution_type_scene_7		=>"用户注册(代理[官方/代理注册/销售离职])-订单购买(在职销售)",
		self::distribution_type_scene_8		=>"用户注册(代理[在职销售注册])-订单购买(官方/销售离职)",
		self::distribution_type_scene_9		=>"用户注册(代理[在职销售注册])-订单购买(同在职销售)",
		self::distribution_type_scene_10	=>"用户注册(代理[在职销售注册])-订单购买(不同在职销售)",
	];
	
	const distribution_role_1=1;//邀请注册人返佣
	const distribution_role_2=2;//邀请注册人父级（销售无父级）返佣
	const distribution_role_3=3;//邀请下单人返佣
	
	const distribution_role_types=[
		self::distribution_role_1=>'邀请注册人返佣',
		self::distribution_role_2=>'邀请注册人父级（销售无父级）返佣',
		self::distribution_role_3=>'邀请下单人返佣'
	];
	
	//分销返佣比例相关-组成（邀请注册人返佣，邀请注册人父级（销售无父级）返佣，邀请下单人返佣）
	const distribution_type_rates=[
		self::distribution_type_scene_1		=>[
			0,0,0
		],
		self::distribution_type_scene_2		=>[
			0,0,0.10
		],
		self::distribution_type_scene_3		=>[
			0.10,0,0
		],
		self::distribution_type_scene_4		=>[
			0.10,0,0
		],
		self::distribution_type_scene_5		=>[
			0.05,0,0.05
		],
		self::distribution_type_scene_6		=>[
			0.08,0,0
		],
		self::distribution_type_scene_7		=>[
			0.08,0,0.02
		],
		self::distribution_type_scene_8		=>[
			0.08,0.02,0
		],
		self::distribution_type_scene_9		=>[
			0.08,0,0.02
		],
		self::distribution_type_scene_10		=>[
			0.08,0.01,0.01
		]
	];
	
}
